<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<div class="table-responsive">
<table class="cntable table table-bordered dataTable table-weekLog">
	<thead>
		<tr>
			<th style="width:50px">序号</th>
			<th style="width:90px">开始时间</th>
			<th style="width:90px">完成时间</th> 
			<th>任务名称</th>
			<th style="width:120px">项目</th>
			<th style="width:100px">责任人</th>
			<th style="width:40px"></th>
		</tr>
	</thead>
	<tbody>
		<c:set value="" var="dateState" />
		<c:forEach var="weekLog" items="${weekLogs}" varStatus="status">
			<c:choose>
			   <c:when test="${weekLog.finishDate == null}">
			   		<c:set value="未完成" var="currDateState" />
			   </c:when> 
			    <c:when test="${weekLog.finishDate != null}">
			   		<c:set value="已完成" var="currDateState" />
			   </c:when> 
			</c:choose>
			<c:if test="${dateState eq ''||dateState ne currDateState}">
				<tr class="no-sel">
					<td colspan="9" style="padding: 3px 10px;">
						<span class="h6">${currDateState}</span>
					</td>
				</tr>
				<c:set value="${currDateState}" var="dateState" />
			</c:if>
			<tr data-id="${weekLog.id}">
				<td>${status.index+1}</td>
				<td><fmt:formatDate value="${weekLog.startDate}" pattern="yyyy-MM-dd "/></td>
				<td><fmt:formatDate value="${weekLog.finishDate}" pattern="yyyy-MM-dd "/></td>
				<td>${weekLog.name}</td>
				<td>${weekLog.projectName}</td>
				<td>${weekLog.studentName}</td>
				<td>
					<c:if test="${weekLog.finishDate == null}">
						<ul class="icons-list">
							<li><a href="javascript:onFinish('${weekLog.id}')" title="点击完成"><i class="icon-checkmark-circle2 text-primary"></i></a></li>
						</ul>
					</c:if>
				</td>
			</tr>
		</c:forEach>
	</tbody>
</table>
</div>